//
// Created by hjie on 23-6-24.
//

#pragma once

#include <string>
#include <memory>
#include <functional>
#include <map>
#include "base_logic_module.h"

class RoomReferenceData;

class PublishSubscribeModule : public BaseLogicModule
{
public:
    PublishSubscribeModule(const std::string & module_name);
    virtual void RegisterMsg(MessageRouter * router);
public:
    std::shared_ptr<BaseProtocol> CreateProtocolData(const std::string & msg, rapidjson::Document & input);
    void PublishReq(RoomReferenceData *data, std::shared_ptr<BaseProtocol> &request);
    void SubscribeReq(RoomReferenceData * data, std::shared_ptr<BaseProtocol> & request);
    void PublishStream(RoomReferenceData * data, std::shared_ptr<BaseProtocol> & request);
    void GetPublishStreamStatus(RoomReferenceData * data, std::shared_ptr<BaseProtocol> & request);
    void SendAnswerReq(RoomReferenceData * data, std::shared_ptr<BaseProtocol> & request);
    void IceCandidateReq(RoomReferenceData * data, std::shared_ptr<BaseProtocol> & request);
};
